home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1997 December
/
MACPOWER-1997-12.ISO.7z
/
MACPOWER-1997-12.ISO
/
AMUG
/
PROGRAMMING
/
Raven 1.2 Examples.sit
/
Raven 1.2 Examples
/
BoxPaint
/
Source
/
Doc.h
< prev
next >
Wrap
Text File
|
1997-03-09
|
2KB
|
93 lines
/*
* File: Doc.h
* Summary: Document class.
* Written by: Jesse Jones
*
* Copyright ゥ 1996 Jesse Jones.
* For conditions of distribution and use, see copyright notice in ZTypes.h
*
* Change History (most recent first):
*
* <-> 5/25/96 JDJ Created
*/
#pragma once
#include <Z3DGroups.h>
#include <Z3DMatrix.h>
#include <Z3DStyles.h>
#include <ZDocument.h>
#include "Texture.h"
// ===================================================================================
// struct S3DScene
// ===================================================================================
struct S3DScene {
T3DDisplayGroup* model;
T3DInterpolationStyle* interpolation;
T3DBackfacingStyle* backFacing;
T3DFillStyle* fillStyle;
T3DMatrix rotation;
};
// ===================================================================================
// class CDocument
// ===================================================================================
class CDocument : public TDocument {
typedef TDocument Inherited;
//-----------------------------------
// Initialization/Destruction
//
public:
virtual ~CDocument();
CDocument(MCommander* super);
//-----------------------------------
// New API
//
public:
S3DScene GetScene();
CTextureMap& GetTexture() {return mTexture;}
void TransformModel(const T3DMatrix& matrix);
//-----------------------------------
// Inherited API
//
protected:
virtual void OnStreamIn(TInStream& stream, long version);
virtual void OnStreamOut(TOutStream& stream) const;
virtual bool OnMenuCommand(const MenuCommand& command);
virtual bool OnCommandStatus(const MenuCommand& command, SCommandStatus& status);
//-----------------------------------
// Internal API
//
protected:
void CreateModel();
void RemapTexture(ulong resolution);
//-----------------------------------
// Member Data
//
protected:
T3DDisplayGroup mModel; // object in the scene being modelled
T3DInterpolationStyle mInterpolation; // interpolation style used when rendering
T3DBackfacingStyle mBackFacing; // whether to draw shapes that face away from the camera
T3DFillStyle mFillStyle; // whether drawn as solid filled object or decomposed to components
T3DMatrix mRotation; // the transform for the model
CTextureMap mTexture; // the paintable texture
};